dict1 = {'name': 'iphone13', 'price': 5988, 'size': 6.8}
del dict1['name']
print(dict1)

# dict.pop(key)  根据下标弹出value,如果key不存在则报错

# print(dict1.pop('name'))  #报错

print(dict1.pop('price'))
print(dict1)

# dict.clear() 清空
dict1.clear()
print(dict1)